﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.IO;
using System.ServiceModel.Web;
using System.Runtime.Serialization;
using WCFMINERP.Contracts.DataContracts;

namespace WCFMINERP.Contracts.InterFaces
{
    [ServiceContract]
    public interface IFilesService
    {
        [WebGet(UriTemplate = "{path}/{serverfile}")]
        [OperationContract]
        Stream DownloadFileStream(string serverfile, string path);

        [WebGet(UriTemplate = "{path}/{serverfile}?offset={offset}&count={count}")]
        [OperationContract(Name = "DownloadFileStreamExt")]
        Stream DownloadFileStream(string serverfile, string path, long offset = 0, long count = 0);

        [WebGet(UriTemplate = "{outshopid}")]
        [OperationContract]
        List<CusFileInfo> GetFiles(string outshopid);

        [WebGet(UriTemplate = "{outshopid}/{photoid}/{state}")]
        [OperationContract]
        bool UpdateDownload(string outshopid, string photoid, string state);
    }   
}